package com.vcc.core.enumConstant;


import lombok.Getter;

import java.util.Arrays;
import java.util.stream.Collectors;


@Getter
public enum ClearTypeEnum {
    Auth("Credit", "贷记"),
    Reversal("Debit", "借记");

    private String status;

    private String title;

    ClearTypeEnum(String status, String title) {
        this.status = status;
        this.title = title;
    }


    public static ClearTypeEnum getByStatus(String status) {
        return Arrays.stream(ClearTypeEnum.values()).filter(it -> it.status.equals(status)).collect(Collectors.toList()).get(0);
    }
}
